package com.gitee.melin.bee.core.grpc.error;

import io.grpc.ServerCall;
import io.grpc.Status;

/**
 * huaixin 2022/1/28 9:54 AM
 */
public interface GrpcExceptionResponseHandler {

    /**
     * Handles an exception by closing the call with an appropriate {@link Status}.
     *
     * @param serverCall The server call used to send the response status.
     * @param error The error to handle.
     */
    void handleError(final ServerCall<?, ?> serverCall, final Throwable error);

}
